]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix always-true condition
authorFederico Mena Quintero <federico@gnome.org>
Mon, 2 Dec 2019 14:02:32 +0000 (08:02 -0600)
committerFederico Mena Quintero <federico@gnome.org>
Mon, 2 Dec 2019 14:04:51 +0000 (08:04 -0600)
CrCascadePrivate->sheets is a statically-sized array inside the
struct; it can't be NULL.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/861#note_659216

src/st/croco/cr-cascade.c

index b8f8277168020779c53c80b1421065b2535791a4..8789288cc19e992efe9680c23b79117ec0e27233 100644 (file)
@@ -199,7 +199,7 @@ cr_cascade_destroy (CRCascade * a_this)
         if (PRIVATE (a_this)) {
                 gulong i = 0;
 
-                for (i = 0; PRIVATE (a_this)->sheets && i < NB_ORIGINS; i++) {
+                for (i = 0; i < NB_ORIGINS; i++) {
                         if (PRIVATE (a_this)->sheets[i]) {
                                 if (cr_stylesheet_unref
                                     (PRIVATE (a_this)->sheets[i])